
"""
    pyprosim - a simple prolog compiler developed to PCS2056 course (Compilers) at Poli-USP\
    Copyright (C) 2008 Rodrigo Rodrigues da Silva

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
"""

from pyprosim.token import *

import logging

class submaquina:

    
    def __init__(self, _tkzr):
        self.tkzr = _tkzr
        
    def consume(self):
        self.current = self.tkzr.next_token()
        logging.debug("Token lido: %s", self.current)
    
    def log_state(self):
        logging.debug("Estou no estado %s lendo token %s" , self.state, self.current)
        
    def log_chamada(self, name):
        logging.info("Chamda de sub-maquina: %s", name)
    
    def log_retorno(self, name):
        logging.info("Retorno de sub-maquina: %s", name)
        